li = [20, 30, 25, 40, 50]
os = list(filter(lambda x: x % 2 == 0, li))
tw = list(filter(lambda x: x > 25, li))

print(os)
print(tw)

def sq(x):
    return x ** 2

print('li:', li)
print('lis:', list(sq(x) for x in li))

print('lis:', list(map(lambda x : x ** 2, li)))

words = ["apple", "fig", "banana"]
print(max(words, key=len))  # 输出："banana"（长度最长）

students = [("小明", 18), ("小红", 20), ("小刚", 19), ("猪刚鬣", 10)]
print(max(students, key=lambda x: x[1]))